﻿using System;
using System.Linq;
using System.Collections.Concurrent;
using System.Collections.Generic;
using System.Linq.Expressions;

namespace CommonPatterns.Caching
{
    public class Repository<TKey, TData> : IRepository<TKey, TData>
    {
        #region Fields
        protected IDictionary<TKey, TData> Cache { get; set; }
        #endregion

        #region Constructors
        public Repository()
        {
            Cache = new ConcurrentDictionary<TKey, TData>();
        } 
        #endregion

        #region Implementation of IRepository<TKey,TData>

        public TData Find(TKey id)
        {
            throw new NotImplementedException();
        }

        public IQueryable<TData> Query()
        {
            throw new NotImplementedException();
        }

        public IQueryable<TData> Query(Expression<Func<TData, bool>> @where)
        {
            throw new NotImplementedException();
        }

        public void Delete(object target)
        {
            throw new NotImplementedException();
        }

        public void Save(object target)
        {
            throw new NotImplementedException();
        }

        public void Insert(object target)
        {
            throw new NotImplementedException();
        }

        public TData[] GetAll()
        {
            throw new NotImplementedException();
        }

        #endregion
    }
}
